home *** CD-ROM | disk | FTP | other *** search
/ Champak 26 (Anniversary Edition) / Volume 26 [Anniversary Edition] - JOGO DISK .iso / Fight / matrixbullettimefighting.swf / scripts / frame_7 / PlaceObject2_216_170 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2006-05-08  |  17KB  |  638 lines

  1. onClipEvent(enterFrame){
  2.    if(this._x < 0)
  3.    {
  4.       this._x = 0;
  5.    }
  6.    else if(800 < this._x)
  7.    {
  8.       this._x = 800;
  9.    }
  10.    if(_root.Start == "on")
  11.    {
  12.       if(Key.isDown(_root.P1Gun))
  13.       {
  14.          if(Shiftdown == "off")
  15.          {
  16.             if(Gun == "on")
  17.             {
  18.                if(this._currentframe == 6 && this.Man._currentframe == 1)
  19.                {
  20.                   tellTarget(this.Man)
  21.                   {
  22.                      gotoAndStop("GunB");
  23.                      play();
  24.                   }
  25.                }
  26.             }
  27.             else if(this._currentframe == 1 && this.Man._currentframe == 1)
  28.             {
  29.                tellTarget(this.Man)
  30.                {
  31.                   gotoAndStop("GunF");
  32.                   play();
  33.                }
  34.             }
  35.          }
  36.          Shiftdown = "on";
  37.       }
  38.       else
  39.       {
  40.          Shiftdown = "off";
  41.       }
  42.       if(0 < _root.P1Bullets)
  43.       {
  44.          if(Key.isDown(_root.P1shoot))
  45.          {
  46.             if(ShotDown == "off")
  47.             {
  48.                if(Gun == "on")
  49.                {
  50.                   if(this.Man.Garm._currentframe < 9)
  51.                   {
  52.                      tellTarget(this.Man.Garm)
  53.                      {
  54.                         gotoAndStop("shoot");
  55.                         play();
  56.                      }
  57.                   }
  58.                }
  59.             }
  60.          }
  61.          else
  62.          {
  63.             ShotDown = "off";
  64.          }
  65.       }
  66.       if(hit != "off")
  67.       {
  68.          Yminus = 0.15;
  69.       }
  70.       else if(this._currentframe == 110)
  71.       {
  72.          Yminus = 0.2;
  73.       }
  74.       else if(Gun == "on" && this._currentframe == 30)
  75.       {
  76.          Yminus = 0.2;
  77.       }
  78.       else
  79.       {
  80.          Yminus = 0.3;
  81.       }
  82.       if(Key.isDown(_root.P1Ultraslow) || Key.isDown(_root.P2Ultraslow))
  83.       {
  84.          _root.Slow = "on";
  85.       }
  86.       else if(Key.isDown(_root.P1slow) || Key.isDown(_root.P2slow))
  87.       {
  88.          _root.Slow = "on2";
  89.       }
  90.       else
  91.       {
  92.          _root.Slow = "off";
  93.       }
  94.       if(hit == "off" || duck == "off")
  95.       {
  96.          if(Key.isDown(_root.P1down))
  97.          {
  98.             if(Kick == "off")
  99.             {
  100.                if(Jump == "off")
  101.                {
  102.                   if(Kickdown == "off")
  103.                   {
  104.                      if(this._currentframe == 1)
  105.                      {
  106.                         tellTarget(this.Man)
  107.                         {
  108.                            gotoAndPlay(4);
  109.                         }
  110.                         Kick = "on1";
  111.                         Kickdown = "on";
  112.                      }
  113.                   }
  114.                }
  115.             }
  116.          }
  117.          else
  118.          {
  119.             Kickdown = "off";
  120.          }
  121.       }
  122.       if(Land == "off" && hit == "off" && Duck == "off" && hide != "on" && Hang != "on")
  123.       {
  124.          if(this._currentframe == 1 && this.Man._currentframe < 5 || 1 < this._currentframe)
  125.          {
  126.             if(Key.isDown(_root.P1Jumphang) && Jump == "off")
  127.             {
  128.                if(X != 0)
  129.                {
  130.                   Jump = "onhang";
  131.                }
  132.             }
  133.             if(Jump == "off")
  134.             {
  135.                if(Key.isDown(_root.P1up) && Jump == "off")
  136.                {
  137.                   if(X == 0)
  138.                   {
  139.                      Jump = "ons";
  140.                   }
  141.                   else
  142.                   {
  143.                      Jump = "onr";
  144.                   }
  145.                }
  146.                if(Key.isDown(_root.P1left))
  147.                {
  148.                   X = -3;
  149.                   this._xscale = -100;
  150.                }
  151.                else if(Key.isDown(_root.P1right))
  152.                {
  153.                   X = 3;
  154.                   this._xscale = 100;
  155.                }
  156.                else
  157.                {
  158.                   X = 0;
  159.                }
  160.             }
  161.             else if(Key.isDown(_root.P1left))
  162.             {
  163.                if(- Speedlimit < X)
  164.                {
  165.                   if(_root.Slow == "on")
  166.                   {
  167.                      X -= 0.025;
  168.                   }
  169.                   else if(_root.Slow == "on2")
  170.                   {
  171.                      X -= 0.05;
  172.                   }
  173.                   else
  174.                   {
  175.                      X -= 0.1;
  176.                   }
  177.                }
  178.             }
  179.             else if(Key.isDown(_root.P1right))
  180.             {
  181.                if(X < Speedlimit)
  182.                {
  183.                   if(_root.Slow == "on")
  184.                   {
  185.                      X += 0.025;
  186.                   }
  187.                   else if(_root.Slow == "on2")
  188.                   {
  189.                      X += 0.05;
  190.                   }
  191.                   else
  192.                   {
  193.                      X += 0.1;
  194.                   }
  195.                }
  196.             }
  197.          }
  198.       }
  199.       else if(hit != "off")
  200.       {
  201.          if(0 < X)
  202.          {
  203.             this._xscale = -100;
  204.          }
  205.          else if(X < 0)
  206.          {
  207.             this._xscale = 100;
  208.          }
  209.       }
  210.       if(Jump == "on")
  211.       {
  212.       }
  213.       if(Y < - Jumplimit)
  214.       {
  215.          Y = - Jumplimit;
  216.       }
  217.       if(Hang != "on")
  218.       {
  219.          if(_root.Slow == "on")
  220.          {
  221.             Y -= Yminus / 2;
  222.             this._y -= Y / 2;
  223.          }
  224.          else if(_root.Slow == "on2")
  225.          {
  226.             Y -= Yminus;
  227.             this._y -= Y;
  228.          }
  229.          else
  230.          {
  231.             Y -= Yminus * 2;
  232.             this._y -= Y * 2;
  233.          }
  234.       }
  235.       var forvar = 1;
  236.       while(forvar < 10)
  237.       {
  238.          if(this._currentframe == 110)
  239.          {
  240.             if(this.Hand.hitTest(_root.Level["G" add forvar]) && this._y < _root.Level["G" add forvar]._y + 40)
  241.             {
  242.                this._y = _root.Level["G" add forvar]._y;
  243.                if(0 < this._xscale)
  244.                {
  245.                   this._x = _root.Level["G" add forvar]._x - _root.Level["G" add forvar]._width / 2;
  246.                }
  247.                else
  248.                {
  249.                   this._x = _root.Level["G" add forvar]._x + _root.Level["G" add forvar]._width / 2;
  250.                }
  251.                Jump = "off";
  252.                Y = 0;
  253.                X = 0;
  254.                Hang = "on";
  255.             }
  256.          }
  257.          if(this.H.hitTest(_root.Level["G" add forvar]))
  258.          {
  259.             if(_root.Level["G" add forvar]._y + _root.Level["G" add forvar]._height < this._y && 0 < Y && this._x < _root.Level["G" add forvar]._x - this._x < _root.Level["G" add forvar]._xscale || _root.Level["G" add forvar]._y + _root.Level["G" add forvar]._height < this._y && 0 < Y && _root.Level["G" add forvar]._x + this._x < this._x < _root.Level["G" add forvar]._xscale)
  260.             {
  261.                this._y = _root.Level["G" add forvar]._y + _root.Level["G" add forvar]._height + this.H._height + 10;
  262.                Y = 0;
  263.             }
  264.             else if(this._x < _root.Level["G" add forvar]._x)
  265.             {
  266.                if(_root.Jump != "on4")
  267.                {
  268.                   this._x = _root.Level["G" add forvar]._x - _root.Level["G" add forvar]._width / 2 - 15;
  269.                }
  270.                if(hit != "off")
  271.                {
  272.                   if(X >= 0)
  273.                   {
  274.                      this._xscale = 100;
  275.                      X *= -1;
  276.                   }
  277.                }
  278.                else if(Key.isDown(_root.P1up) && Gun != "on")
  279.                {
  280.                   if(Jump != "off")
  281.                   {
  282.                      if(X >= 0)
  283.                      {
  284.                         if(2 < Y)
  285.                         {
  286.                            this._xscale = 100;
  287.                            Jump = "onw3";
  288.                            Y = 0;
  289.                            X = 0;
  290.                         }
  291.                         else if(Jump != "on3")
  292.                         {
  293.                            this._xscale = 100;
  294.                            Jump = "onw2";
  295.                            Y = 0;
  296.                            X = 0;
  297.                         }
  298.                      }
  299.                   }
  300.                }
  301.             }
  302.             else if(_root.Level["G" add forvar]._x < this._x)
  303.             {
  304.                this._x = _root.Level["G" add forvar]._x + _root.Level["G" add forvar]._width / 2 + 15;
  305.                if(hit != "off")
  306.                {
  307.                   if(0 >= X)
  308.                   {
  309.                      this._xscale = -100;
  310.                      X *= -1;
  311.                   }
  312.                }
  313.                else if(Key.isDown(_root.P1up) && Gun != "on")
  314.                {
  315.                   if(Jump != "off")
  316.                   {
  317.                      if(0 >= X)
  318.                      {
  319.                         if(2 < Y)
  320.                         {
  321.                            this._xscale = -100;
  322.                            Jump = "onw4";
  323.                            Y = 0;
  324.                            X = 0;
  325.                         }
  326.                         else if(Jump != "on3")
  327.                         {
  328.                            this._xscale = -100;
  329.                            Jump = "onw";
  330.                            Y = 0;
  331.                            X = 0;
  332.                         }
  333.                      }
  334.                   }
  335.                }
  336.             }
  337.          }
  338.          if(this.feet.hitTest(_root.Level["G" add forvar]))
  339.          {
  340.             if(_root.Level["G" add forvar]._y + 20 >= this._y && 0 >= Y)
  341.             {
  342.                this._y = _root.Level["G" add forvar]._y;
  343.                Hitstyle = "off";
  344.                if(hit == "off")
  345.                {
  346.                   if(this._currentframe == 53 || this._currentframe == 58)
  347.                   {
  348.                      Land = "on";
  349.                   }
  350.                   else if(Kick == "onJ" && Jump == "on2")
  351.                   {
  352.                      Land = "on2";
  353.                   }
  354.                   if(Jump == "on2" || Jump == "on")
  355.                   {
  356.                      if(Gun == "on" && this._currentframe == 30)
  357.                      {
  358.                         if(0 < this._xscale)
  359.                         {
  360.                            X = 2;
  361.                         }
  362.                         else
  363.                         {
  364.                            X = -2;
  365.                         }
  366.                         Land = "Gon";
  367.                      }
  368.                      else if(Gun == "on" && this._currentframe == 27 && 90 < this.Man._currentframe)
  369.                      {
  370.                         Land = "GBon";
  371.                      }
  372.                      else if(this._currentframe == 110)
  373.                      {
  374.                         Land = "Gon";
  375.                      }
  376.                      Jump = "off";
  377.                   }
  378.                   stand = "on";
  379.                   Y = 0;
  380.                }
  381.                else
  382.                {
  383.                   X /= 2;
  384.                   Y *= -0.5;
  385.                   if(Y < 2 && X < 2 && -2 < X)
  386.                   {
  387.                      X = 0;
  388.                      Y = 0;
  389.                      if(this.Man._currentframe < 36)
  390.                      {
  391.                         tellTarget(this.Man)
  392.                         {
  393.                            gotoAndPlay(36);
  394.                         }
  395.                      }
  396.                   }
  397.                   else
  398.                   {
  399.                      hit = "on";
  400.                      if(this.Man._currentframe < 36)
  401.                      {
  402.                         if(this.Man._currentframe < 19)
  403.                         {
  404.                            tellTarget(this.Man)
  405.                            {
  406.                               gotoAndStop("G");
  407.                               play();
  408.                            }
  409.                         }
  410.                         else
  411.                         {
  412.                            tellTarget(this.Man)
  413.                            {
  414.                               gotoAndPlay(19);
  415.                            }
  416.                         }
  417.                      }
  418.                   }
  419.                }
  420.             }
  421.          }
  422.          forvar++;
  423.       }
  424.       if(Hang != "on")
  425.       {
  426.          if(_root.Slow == "on")
  427.          {
  428.             this._x += X / 2;
  429.          }
  430.          else if(_root.Slow == "on2")
  431.          {
  432.             this._x += X;
  433.          }
  434.          else
  435.          {
  436.             this._x += X * 2;
  437.          }
  438.       }
  439.       if(hang == "on")
  440.       {
  441.          tellTarget(this)
  442.          {
  443.             gotoAndStop("Hang");
  444.          }
  445.       }
  446.       else if(hit == "on")
  447.       {
  448.          tellTarget(this)
  449.          {
  450.             gotoAndStop("hit");
  451.          }
  452.       }
  453.       else if(hit == "on2")
  454.       {
  455.          tellTarget(this)
  456.          {
  457.             gotoAndStop("hit2");
  458.          }
  459.       }
  460.       else if(Duck == "on")
  461.       {
  462.          tellTarget(this)
  463.          {
  464.             gotoAndStop("Duck");
  465.          }
  466.       }
  467.       else if(Land == "on")
  468.       {
  469.          tellTarget(this)
  470.          {
  471.             gotoAndStop("Land");
  472.          }
  473.       }
  474.       else if(Land == "on2")
  475.       {
  476.          tellTarget(this)
  477.          {
  478.             gotoAndStop("Land2");
  479.          }
  480.       }
  481.       else if(Land == "Gon")
  482.       {
  483.          tellTarget(this)
  484.          {
  485.             gotoAndStop("GLand");
  486.          }
  487.       }
  488.       else if(Land == "GBon")
  489.       {
  490.          tellTarget(this)
  491.          {
  492.             gotoAndStop("Land3");
  493.          }
  494.       }
  495.       else if(Jump != "off")
  496.       {
  497.          if(Jump == "ons")
  498.          {
  499.             if(Gun == "on")
  500.             {
  501.                tellTarget(this)
  502.                {
  503.                   gotoAndStop("GJump");
  504.                }
  505.             }
  506.             else
  507.             {
  508.                tellTarget(this)
  509.                {
  510.                   gotoAndStop("Jump");
  511.                }
  512.             }
  513.             Jump = "on3";
  514.          }
  515.          else if(Jump == "onhang")
  516.          {
  517.             if(Gun == "on")
  518.             {
  519.                tellTarget(this)
  520.                {
  521.                   gotoAndStop("GJump2");
  522.                }
  523.             }
  524.             else
  525.             {
  526.                tellTarget(this)
  527.                {
  528.                   gotoAndStop("Jumphang");
  529.                }
  530.             }
  531.             Jump = "on3";
  532.          }
  533.          else if(Jump == "onr")
  534.          {
  535.             if(Gun == "on")
  536.             {
  537.                tellTarget(this)
  538.                {
  539.                   gotoAndStop("GJump2");
  540.                }
  541.             }
  542.             else
  543.             {
  544.                tellTarget(this)
  545.                {
  546.                   gotoAndStop("Jump2");
  547.                }
  548.             }
  549.             Jump = "on3";
  550.          }
  551.          else if(Jump == "onw")
  552.          {
  553.             tellTarget(this)
  554.             {
  555.                gotoAndStop("Jump3");
  556.             }
  557.             Jump = "on3";
  558.          }
  559.          else if(Jump == "onw2")
  560.          {
  561.             tellTarget(this)
  562.             {
  563.                gotoAndStop("Jump4");
  564.             }
  565.             Jump = "on3";
  566.          }
  567.          else if(Jump == "onw3")
  568.          {
  569.             tellTarget(this)
  570.             {
  571.                gotoAndStop("Jump5");
  572.             }
  573.             Jump = "on3";
  574.          }
  575.          else if(Jump == "onw4")
  576.          {
  577.             tellTarget(this)
  578.             {
  579.                gotoAndStop("Jump6");
  580.             }
  581.             Jump = "on3";
  582.          }
  583.          if(Kick == "on2")
  584.          {
  585.             tellTarget(this.Man)
  586.             {
  587.                gotoAndStop("Kick");
  588.                play();
  589.             }
  590.             Kick = "on";
  591.          }
  592.          if(Kick == "on3")
  593.          {
  594.             tellTarget(this.Man)
  595.             {
  596.                gotoAndStop("Kick2");
  597.                play();
  598.             }
  599.             Kick = "on";
  600.          }
  601.       }
  602.       else if(X == 0)
  603.       {
  604.          if(Gun == "on")
  605.          {
  606.             tellTarget(this)
  607.             {
  608.                gotoAndStop("Gstand");
  609.             }
  610.          }
  611.          else
  612.          {
  613.             tellTarget(this)
  614.             {
  615.                gotoAndStop("stand");
  616.             }
  617.          }
  618.       }
  619.       else if(Gun == "on")
  620.       {
  621.          tellTarget(this)
  622.          {
  623.             gotoAndStop("Grun");
  624.          }
  625.       }
  626.       else
  627.       {
  628.          tellTarget(this)
  629.          {
  630.             gotoAndStop("run");
  631.          }
  632.       }
  633.       if(_root.Slow == "on")
  634.       {
  635.       }
  636.    }
  637. }
  638.